package j13;

public class J13_Q77_Books_OOP {

	public static void main(String[] args) {
		// 도서 관리 시스템(OOP)
		J13_Book book = 			//객체화
				new J13_Book(12345,"알기쉬운 Java","혜지원","신다슬",
						"공포,호러",25000,false,"2014-06-10 12:12:12");
		
		J13_Book[] books = new J13_Book[5];
		books[0] = book;
		J13_Member member = new J13_Member(0001, "황태오", "123-4567",
					"서울시 구로구",books , 20);
		
		System.out.println(book.toString());
	}

}

class J13_Book {
	private int bookNo;
	private String bookName;
	private String pub;
	private String writer;
	private String genre;
	private int price;
	private boolean rent;
	private String regdate;
	
	public J13_Book(int bookNo,String bookName,String pub,String writer,
			String genre,int price,boolean rent,String regdate) {
		this.bookNo = bookNo;
		this.bookName = bookName;
		this.pub = pub;
		this.writer = writer;
		this.genre = genre;
		this.price = price;
		this.rent = rent;
		this.regdate = regdate;
		
		
	}
	
	
	 @Override
	public String toString() {
		 String bookInfo = "도서명 : "+bookName;
			bookInfo +=" // 출판사 : "+pub;
		return bookInfo;
	}
	 
}
 

class J13_Member {
	private int memberNo;
	private String name;
	private String telNo;
	private String address;
//	private J13_Book rbook1;
//	private J13_Book rbook2;
//	private J13_Book rbook3;
//	private J13_Book rbook4;
//	private J13_Book rbook5;
	private J13_Book[] rbooks;
	private int mileage;
	
	public J13_Member(int memberNo,String name,String telNo,
			String address,J13_Book[] rbooks,int mileage) {
		this.memberNo = memberNo;
		this.name = name;
		this.telNo = telNo;
		this.address = address;
		this.rbooks = rbooks;
		this.mileage = mileage;
		
	}
}